﻿using System;
using System.Text;
using System.Text.RegularExpressions;
namespace Fcom.VNInsurance.Web.Utils
{
    public class Url
    {
        public static string url_rewrite(string s)
        {
            
            Regex repl = new Regex(@"\W");
            s = repl.Replace(s, "-").ToLower();
            Regex regex = new Regex("\\p{IsCombiningDiacriticalMarks}+");
            string temp = s.Normalize(NormalizationForm.FormD);
            return regex.Replace(temp, String.Empty).Replace('\u0111', 'd').Replace('\u0110', 'D');
        }  
    }
}